package com.example.smartcity1.service.life;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;

import com.example.smartcity1.R;

import java.util.HashSet;
import java.util.Set;

public class LifeHomeActivity extends AppCompatActivity {

    private ConstraintLayout waterCon;
    private ConstraintLayout electricityCon;
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_life_home);
        ActionBar supportActionBar = getSupportActionBar();
        if (supportActionBar != null) {
            supportActionBar.setTitle("生活缴费");
            supportActionBar.setDisplayHomeAsUpEnabled(true);
        }
        initView();
        waterCon.setOnClickListener(v -> {

        });
        electricityCon.setOnClickListener(v -> {

        });
        button.setOnClickListener(v -> {
            startActivity(new Intent(LifeHomeActivity.this,LifeHouseActivity.class));
        });
    }

    @Override
    public boolean onSupportNavigateUp() {
        finish();
        return super.onSupportNavigateUp();
    }

    private void initView() {
        waterCon = findViewById(R.id.water_con);
        electricityCon = findViewById(R.id.electricity_con);
        button = findViewById(R.id.button);
    }
}